package com.hksj.common.quartz.config;

import com.hksj.common.quartz.service.CronJobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class CronJobRunner implements ApplicationRunner {
    @Autowired
    private CronJobService cronJobService;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        cronJobService.initCronJob();
    }
}
